<?php
//A Simple Helloworld Example to perform a
//PHP SOAP enabled call to the Payment Gateway

$params->arg0 = 'SCNet_Cert6'; //Merchant Id
$params->arg1 = 'testSCNet'; //password
$params->arg2 = '4444333322221111'; //Card Number
$params->arg3 = '1111'; //Expiry
$params->arg4 = '111'; //CVC
$params->arg5 = '12.00'; //Amount
$params->arg6 = 'Mr John Citizen'; //Cardholder optional
$params->arg7 = 'AUD'; //Currency
$params->arg8 = '100'; //InvoiceId optional

$client = new soapClient("https://www.scnet.com.au/ipayby/ipaybyws?WSDL",array('location' => 'https://www.scnet.com.au/ipayby/ipaybyws'));

$soap_response = $client->performTransaction($params);
print("\n<br><pre>");
print_r("The Transaction Summary is listed below....");
print("</pre><br>\n");

echo("\n<br><pre>");
echo("Order Number: " . $soap_response->return->orderNumber);
echo("<br>");
echo("Summary Response: " . $soap_response->return->summaryResponseCode);
echo("<br>");
echo("Response Code: " . $soap_response->return->responseCode);
echo("<br>");
echo("Response Text: " . $soap_response->return->responseText);
echo("<br>");
echo("Amount: " . $soap_response->return->amount);
echo("<br>");
echo("Auth ID: " . $soap_response->return->authId);
echo("<br>");
echo("RRN: " . $soap_response->return->RRN);
echo("<br>");
echo("Settlement Date: " . $soap_response->return->settlementDate);
echo("<br>");
echo("Transaction Type: " . $soap_response->return->transactionType);
echo("</pre><br>\n");
?>